import java.math.BigDecimal;
class TestOverloading{
    public int add(int a,int b){
        System.out.println("整数 " + a + ", " + b);
        test1();
        return a + b;
    }
    public BigDecimal add(double a,double b) {
        System.out.println("浮点数 " + a + ", " + b);
        BigDecimal a1 = new BigDecimal(Double.toString(a));
        BigDecimal b1 = new BigDecimal(Double.toString(b));
        return a1.add(b1);
    }
    private void test1(){
        System.out.println("Hello World");
    }
    static void test(){
        System.out.println("你好，中国");
    }
    static double PI=3.1415926;
}

public class MethodOverloading {
    public static void main(String[] args){
        TestOverloading test = new TestOverloading();
        System.out.println(test.add(1,2));
        System.out.println(test.add(2.3,3.4));
        TestOverloading.test();
        System.out.println(TestOverloading.PI);
    }
}
